Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update metrics to conform promlint #91448

Merged
merged 1 commit into from
May 28, 2020

Conversation

RainbowMango
Copy link
Member

@RainbowMango RainbowMango commented May 26, 2020

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Update metrics name from scheduler_total_preemption_attempts to scheduler_preemption_attempts_total as per promlint rules: counter metrics should have "_total" suffix.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

kube-scheduler: The metric name `scheduler_total_preemption_attempts` has been renamed to `scheduler_preemption_attempts_total`.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

/priority important-soon

…tion_attempts_total as counter metrics should have _total suffix.
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 26, 2020
@k8s-ci-robot k8s-ci-robot requested review from ahg-g and x13n May 26, 2020 12:36
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 26, 2020
@RainbowMango
Copy link
Member Author

/test pull-kubernetes-dependencies

@fedebongio
Copy link
Contributor

/assign @logicalhan

Copy link
Member

@logicalhan logicalhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 26, 2020
@RainbowMango
Copy link
Member Author

/test pull-kubernetes-e2e-kind
/test pull-kubernetes-e2e-gce-100-performance

/assign @ahg-g

@ahg-g
Copy link
Member

ahg-g commented May 27, 2020

/hold

this is like deprecating and adding a new metric!

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 27, 2020
@RainbowMango
Copy link
Member Author

this is like deprecating and adding a new metric!

There usually two methods for modifying a metric, especially for an alpha metric:

  • 1 Modify directly as it's in the alpha state;
  • 2 deprecate the old one and create a new replacement.

Seems @ahg-g like method 2, right?

/cc @Huang-Wei

@ahg-g
Copy link
Member

ahg-g commented May 28, 2020

/lgtm
/approve

since it is an alpha metric

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, logicalhan, RainbowMango

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 28, 2020
@logicalhan
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 28, 2020
@Huang-Wei
Copy link
Member

LGTM, thanks @RainbowMango.

@k8s-ci-robot k8s-ci-robot merged commit 472a4e9 into kubernetes:master May 28, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone May 28, 2020
@RainbowMango RainbowMango deleted the pr_fix_metric_naming branch May 29, 2020 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants